#ifndef _HEADER_H_
#define _HEADER_H_
#include<iostream>
#include<arbb.hpp>
#define UNVISITED 0
#define VISITED 1
using namespace arbb;
using namespace std;

dense<i32,2>  Matrix;
dense<i32>  Mark; 

void 
DFS(i32 vertex, i32 numVertex)
{
	_if (Mark[vertex] == VISITED) {
	} _else {
		Mark[vertex]=VISITED;
		std::cout<<"v "<< std::endl;
		i32 w=0;
		i32 i=0;
		////////////////////////// finding first neighbor
		_for(i=0, i<numVertex, i++) {
			_if(Matrix(vertex,i) != 0) {
				_break;
			}_end_if;
		}_end_for;

		//////////////////////////// DFS algorithm
		_for(w=i,w<numVertex,) {
#if _CALL
			call(DFS)(w, numVertex);
#else
			DFS(w, numVertex);
#endif
			_for(w=w+1, w<numVertex, w++) {
				_if(Matrix(vertex,w) != 0) {
					_break;
				}_end_if;
			}_end_for;
		}_end_for;
	} _end_if
}
#endif
